<?php

use Illuminate\Routing\Router;

Route::group([
    'prefix' => 'admin/brand',
    'namespace' => 'Beerus\\Modules\\Brand\\Controllers',
    'middleware' => [
        'web',
        'admin',
    ],
], function (Router $router) {

    /*品牌活动审核相关---start*/
    $router->get('/h5checklist', 'H5CheckController@index');
    $router->post('/checkpass', 'H5CheckController@checkPass');//审核通过
    $router->post('/checkover', 'H5CheckController@checkOver');//审核不通过
    /*品牌活动审核相关-----end*/

    /*wiki 审核相关---start*/
    $router->get('/wiki/list', 'WikiController@index');
    $router->put('/wiki/list/{id}', 'WikiController@editableWiki');
    $router->post('/wiki/audit', 'WikiController@audit');
    //批量审核通过
    $router->any('/wiki/audits', 'WikiController@audits');
    $router->any('/wiki/img/edit', 'WikiController@WikiImgEdit');
    $router->any('/wiki/img/save', 'WikiController@WikiImgSave');
    $router->any('/wiki/imagelist', 'WikiBasicImagesController@imageList');
    $router->any('/wiki/checklist', 'WikiBasicImagesController@checkList');
    $router->any('/wiki/img/audit_images', 'WikiBasicImagesController@auditImages');
    $router->any('/wiki/img/audit', 'WikiBasicImagesController@audit');
    $router->post('/wiki/img/batchAudit', 'WikiBasicImagesController@batchAudit');
    //编辑待审核
    $router->get('/wiki/editAuditList', 'WikiController@editAuditList');
    $router->post('/wiki/editAuditList/audit', 'WikiController@editAudit');
    $router->get('/wiki/editAuditList/{id}/editUnPass', 'WikiController@editUnPass');
    $router->post('/wiki/editAuditList/audits', 'WikiController@editAudits');

    $router->get('/wiki/audit/{id}/unPass', 'WikiController@unPass');
    $router->get('/wiki/changeCategory/{id}', 'WikiController@changeCategory');
    $router->post('/wiki/changeCategory/{id}/save', 'WikiController@postChangeCategory');
    $router->get('/wiki/changeTag/{id}', 'WikiController@changeTag');
    $router->post('/wiki/changeTag/{id}/save', 'WikiController@postChangeTag');
    $router->get('/wiki/unPassLog/{id}', 'WikiController@unPassLog');
    /*wiki 审核相关---end*/

    //认领/关联审核
    $router->get('/wikiContent/list', 'WikiContentController@list');
    $router->post('/wikiContent/audit', 'WikiContentController@audit');
    $router->get('/wikiContent/audit/{id}/unPass/{wid}', 'WikiContentController@unPass');
    $router->post('/wikiContent/audit/{id}/unPass/{wid}', 'WikiContentController@reject');

    /** 品牌基础信息审核 start **/
    //新品牌账户、认证信息管理
    $router->get('/account/index', 'BrandAccountInfoController@index');//品牌账户管理列表
    $router->delete('/account/index/{id}', 'BrandAccountInfoController@delAccount');//删除账户
    $router->get('/account/index/{id}/setBrandType/{brandType}', 'BrandAccountInfoController@setBrandType');//设置品牌身份
    $router->get('/account/index/{id}/openShop', 'BrandAccountInfoController@openShop');//开通店铺账户
    $router->get('/account/index/{id}/{step}', 'BrandAccountInfoController@edit');//品牌账户编辑
    $router->post('/account/index/{id}/{step}/save', 'BrandAccountInfoController@save');//品牌账户编辑保存
    $router->get('/account/index/shop/{id}/del', 'BrandAccountInfoController@delShop');//品牌账户-店铺信息删除
    $router->get('/account/auth/{id}/audit/{authStatus}', 'BrandAccountInfoController@audit');//认证信息-审核通过
    $router->post('/account/auth/{id}/audit/{authStatus}', 'BrandAccountInfoController@audit');//认证信息-审核不通过
    $router->get('/account/auth/noPass/{id}', 'BrandAccountInfoController@noPass');//认证信息-审核不通过
    $router->get('/account/auth/index', 'BrandAccountInfoController@authList');//认证管理列表
    $router->delete('/account/auth/index/{id}', 'BrandAccountInfoController@delAuth');//删除认证信息
    // 品牌账户管理
    $router->get('/upgrade/order/{id}/add', 'BrandUpgradeController@addOrder');
    $router->post('/upgrade/order/{id}/save', 'BrandUpgradeController@saveOrder');
    $router->get('/upgrade/confirm', 'BrandUpgradeController@confirm');
    $router->get('/pay/qrcode/{id}', 'BrandUpgradeController@qrcode');
    $router->post('/pay/qrcode/{id}', 'BrandUpgradeController@postQrcode');
    // 品牌基础信息审核
    $router->get('/baseInfo/audit', 'BaseInfoAuditController@index');
    $router->get('/baseInfo/audit/{id}', 'BaseInfoAuditController@auditInfo');
    $router->get('/baseInfo/audit/{id}/{op}', 'BaseInfoAuditController@audit');
    $router->get('/reject/{id}', 'BaseInfoAuditController@rejectLayer');
    $router->post('/baseInfo/audit/reject', 'BaseInfoAuditController@reject');
    // 内部品牌清单
    $router->get('/list', 'BrandController@index');
    $router->get('/edit/{id?}', 'BrandController@edit');
    $router->get('/list/create', 'BrandController@edit');
    $router->post('/save', 'BrandController@save');
    $router->delete('/list/{id}', 'BrandController@del');
    $router->get('/getAllBrand', 'BrandController@getAllBrand');
    $router->get('/brandArea/{brand_id}', 'BrandAreaController@index');
    $router->post('/brandArea/{brand_id}', 'BrandAreaController@saveBaseInfo');
    $router->get('/brandArea/{brand_id}/addModule/{module_type}', 'BrandAreaController@addModule');
    $router->get('/brandArea/{brand_id}/{module_id}/edit', 'BrandAreaController@editModule');
    $router->delete('/brandArea/{brand_id}/{module_id}', 'BrandAreaController@delModule');
    $router->put('/brandArea/{brand_id}/{module_id}', 'BrandAreaController@modifyAd');
    $router->post('/brandArea/{brand_id}/addModule/{module_type}', 'BrandAreaController@saveModule');
    $router->post('/brandArea/{brand_id}/addAd', 'BrandAreaController@saveAd');
    $router->put('/list/{id}', 'BrandController@isTest');
    /** 品牌基础信息审核 end **/
    $router->get('/orders', 'BrandOrderController@index');
    $router->get('/export_order', 'BrandOrderController@exportOrder');

    /** 品牌banner管理 start **/
    $router->get('/bannerlist/index', 'BrandBannerController@bannerList');
    $router->get('/bannerlist/index/create', 'BrandBannerController@addBanner');
    $router->get('/bannerlist/index/{id}/edit', 'BrandBannerController@editBanner');
    $router->post('/bannerlist/save', 'BrandBannerController@save');
    $router->delete('/bannerlist/index/{id}', 'BrandBannerController@delBanner');
    $router->post('/bannerlist/sort', 'BrandBannerController@sort');
    /** 品牌banner管理 end **/


    /** 品牌问答管理 start **/
    $router->get('/questionlist/{step}/index', 'BrandQuestionsController@questionList');
    $router->get('/questionlist/{step}/index/create', 'BrandQuestionsController@addQuestion');
    $router->get('/questionlist/{step}/index/{id}/edit', 'BrandQuestionsController@editQuestion');
    $router->post('/questionlist/{step}/save', 'BrandQuestionsController@save');
    $router->delete('/questionlist/{step}/index/{id}', 'BrandQuestionsController@delQuestion');
    $router->post('/questionlist/{step}/sort', 'BrandQuestionsController@sort');

    $router->get('/grouplist/index', 'BrandQuestionsController@groupList');
    $router->get('/grouplist/index/create', 'BrandQuestionsController@addQuestionCategory');
    $router->get('/grouplist/index/{id}/edit', 'BrandQuestionsController@editQuestionCategory');
    $router->post('/grouplist/save', 'BrandQuestionsController@saveCategory');
    $router->delete('/grouplist/index/{id}', 'BrandQuestionsController@delQuestionCategory');
    $router->post('/grouplist/sort', 'BrandQuestionsController@sortCategory');
    /** 品牌问答管理 end **/

    //小活动 note活动
    $router->get('/smallactivity', 'SmallActivityController@list');
    $router->get('/smallactivity/create', 'SmallActivityController@edit');
    $router->get('/smallactivity/{id}/edit', 'SmallActivityController@edit');
    $router->post('/smallactivity/save', 'SmallActivityController@save');
    $router->post('/smallactivity/{id}/close', 'SmallActivityController@close');
    $router->get('/smallactivity/{id}/lottery', 'SmallActivityController@lottery');
    $router->post('/smallactivity/{id}/lottery/save', 'SmallActivityController@savelottery');
    $router->delete('/smallactivity/{id}/lottery/{uid}', 'SmallActivityController@dellottery');

    /** 今日推荐品牌管理 start **/
    $router->get('/recommendedTodayList/index', 'BrandRecommendedTodayController@index');
    $router->get('/recommendedTodayList/create', 'BrandRecommendedTodayController@add');
    $router->get('/recommendedTodayList/{id}/edit', 'BrandRecommendedTodayController@edit');
    $router->post('/recommendedTodayList/save', 'BrandRecommendedTodayController@save');
    $router->delete('/recommendedTodayList/{id}', 'BrandRecommendedTodayController@del');
    $router->post('/recommendedTodayList/sort', 'BrandRecommendedTodayController@sort');
    /** 今日推荐品牌管理 end **/

    /** 品牌商学院 start **/
    $router->get('/college/notes', 'BrandCollegeController@noteList');
    $router->post('/college/notes', 'BrandCollegeController@noteSubmit');
    $router->put('/college/notes/{id}', 'BrandCollegeController@noteSubmit');
    $router->delete('/college/notes/{id}', 'BrandCollegeController@noteDelete');
    $router->get('/college/notes/count', 'BrandCollegeController@getNoteCount');
    $router->post('/college/sort', 'BrandCollegeController@noteSort');
    /** 品牌商学院 end **/


});
